The human labor involved in separating local traffic and doing small deliveries rather than just aggregating them would outstrip the cost of shipping them back to a main center.
It is mind boggling how expensive human labor is, thus automated shipping systems resulting in large scale aggregation is worth it.
On the other hand, waiting for a box to fill to optimize last mile deliveries, takes up space and labor just as well, hence you get the cases where Amazon will ship 3 packages through 3 different couriers in the same day.